package com.future.serviceImpl;

import com.future.dto.AroomNameDto;
import com.future.dto.RoomDto;
import com.future.dto.RoomForSex;
import com.future.dto.RoomForStudentsDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.future.mapper.RoomMapper;
import com.future.domain.Room;
import com.future.service.RoomService;
/**
 * @Auther: 田坑坑
 * @Date: 2022/6/20 14:01
 * @Description:  我题序等你回
 */
@Service
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements RoomService{

    @Autowired
    RoomMapper roomMapper;


    @Override
    public List<RoomForSex> findRoomForSex(String roomSex) {
        return this.roomMapper.roomFomSex(roomSex);
    }

    @Override
    public List<RoomForStudentsDto> findStudent(int roomId) {
        return this.roomMapper.roomsearchStudents(roomId);
    }

    @Override
    public List<RoomDto> findRoomS(String roomSex) {
        return this.roomMapper.selectRoomForStoryUserinfo(roomSex);
    }

    @Override
    public int updateBatch(List<Room> list) {
        return baseMapper.updateBatch(list);
    }
    @Override
    public int updateBatchSelective(List<Room> list) {
        return baseMapper.updateBatchSelective(list);
    }
    @Override
    public int batchInsert(List<Room> list) {
        return baseMapper.batchInsert(list);
    }

    @Override
    public List<AroomNameDto> findRoom(String storeyname) {
        return this.roomMapper.findRooms(storeyname);
    }
}
